<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Guests list</title>
        <link rel="stylesheet"  type="text/css" href="css/guestbook.css" />
    </h:head>
    <h:body>
        <h3><h:outputText value="List of guests!"/></h3>
        <a href="addguest.xhtml">Add more guests!</a>
        <p></p>

        <h:form>
            <h:dataTable value="#{guestDataBean.guestList}" var="guest">
                <h:column>
                    <f:facet name="header">
                        <h:outputText value="First name"/>
                    </f:facet>
                    <h:outputText value="#{guest.firstName}"/>
                </h:column>
                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Last name"/>
                    </f:facet>
                    <h:outputText value="#{guest.lastName}"/>
                </h:column>
                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Email"/>
                    </f:facet>
                    <h:outputText value="#{guest.email}"/>
                </h:column>
            </h:dataTable>
        </h:form>
    </h:body>
</html>

